home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 112 / EnigmaAmiga112CD.iso / dalla rivista / awnpipe / awnp / awnp-docs / internals.doc < prev    next >
Text File  |  2000-05-18  |  3KB  |  66 lines

  1. Internal controls.
  2. -----------------
  3.  
  4. These options control some of the behaviours of AWNP regarding opening pipes and reading data.
  5.  
  6. - option
  7. ========
  8.  
  9.  Specify a minimum version of AWNPipe you need. The format is /-VVRRR where V is the version and R is the revision.
  10.  Opening AWNPipe:name/-02009 will fail to open unless AWNPipe is version 2.9 or newer.
  11.  
  12. A option
  13. ========
  14.  
  15.  Abort pending reads.  If you try to open a pipe using the '/a' option any pending reads are aborted.  This USUALLY causes the pipe to shut so you can reuse the pipename. It is seldom if ever needed now since AWNP catches most problems and shuts down 'hung' pipes automatically. The open itself ALWAYS fails, this is intended.
  16.  
  17. M option
  18. ========
  19.  
  20.  Multiple opens. When a pipe is opened with this option it behaves normally. However when this file handle is closed that end of the pipe becomes available to be opened again. If you open the pipe name again with the  '/1' (open first end)  flag is set the open call only tries to open the first side of the pipe (the end that was opened when the pipe was created). If the donotwait flag is set the open call only tries to open the second side of the pipe (the end that was NOT opened first). When neither flag is set you get the first end of the pipe if available, else you get the second end.
  21.  
  22. I option
  23. ========
  24.  
  25.  Immediate reads. Reads to the file handle will return if there is any data waiting to be read. If you try to read 10 characters from the pipe and only 5 are available, the read returns with the five characters immediately (rather than waiting for 5 more characters to be available). Therefore only a read of 0 length means end of file. This is useful with data originating  interactively from con: or ser: .
  26.  
  27. F option
  28. ========
  29.  
  30.  Force a pipe to be created. A new pipe is created even if the pipe name is already is use. The open will not fail, and it will not connect to any currently existing pipe end. After both ends of the forced pipe are opened any previous partial ( only opened once) pipe of that name becomes available again. (ONLY FORCE THE FIRST END OF THE PIPE)
  31.  
  32. ! or ~ option.
  33. ==============
  34.  
  35.  Do not wait. The open will fail unless the other end of the pipe is already open. A new pipe will not ever be created. Used on a tap it stops the tap from waiting for a matching pipe to be created.
  36.  
  37. @ option
  38. ==============
  39.  
  40.  Respond to seek packets. Normally seek is not supported by AWNPipe. If see is turned on, the current position is reported as '0' if no data is available on the pipe, '1' if data is waiting to be read.
  41.  
  42.  NOTE Do not use this function from ARexx as ARexx has a read ahead buffer
  43. that is flushed when you call seek. This can cause you to loose data. It may
  44. also happen in other languages if read data is buffered.
  45.  
  46. S or s option
  47. ==============
  48.  
  49. Status of a pipe. This MUST always be a tap as well. Read only returns a single byte. This is the status of the real pipe the tap refers to. The bits/nibbles or byte meanings are as follows.
  50.  
  51. 'FF' indicates  file handle does not exist. (you can check just the high bit)
  52.  
  53. low nibble = First end that is opened.
  54. high nibble =second end opened.
  55.  
  56. in each nibble
  57.  
  58. bit 4 always zero when FH exists
  59. bit 3 FH opened.  (nibble&4)
  60. bit 2 FH closed.  (nibble&2)
  61. bit 1 FH data available.  (nibble&1)  sub for WaitForChar in AREXX.
  62.  
  63. Note 'FF' indicates no file handle active.
  64.  
  65.  
  66.